import { BaiscComponent } from './basic/basic.component';
import { EventTemplateComponent } from './event-template/event-template.component';
import { DragComponent } from './drag/drag.component';

export const CalendarConfig = {
  location: 'Calendar',
  description: `按照日历形式展示数据的容器（暂只支持chrome浏览器）`,
  description_en: ``,
  component: [
    {
      demo: BaiscComponent,
      codePath: 'showcase/calendar/basic/basic.component',
      demoTitle: '基础',
      demoTitle_en: 'Basic',
      demoDescription: '基础的日历使用。',
      demoDescription_en: 'Basic use of calendar.'
    },
    {
      demo: EventTemplateComponent,
      codePath: 'showcase/calendar/event-template/event-template.component',
      demoTitle: '事件模板',
      demoTitle_en: 'Event Template',
      demoDescription: '',
      demoDescription_en: ''
    },
    {
      demo: DragComponent,
      codePath: 'showcase/calendar/drag/drag.component',
      demoTitle: '拖拽调整单元格高度',
      demoTitle_en: '',
      demoDescription: '拖拽调整日历单元格高度，目前只支持月模式',
      demoDescription_en: ''
    }
  ],
  useRule: [],
  useSuggestion: [],
  mApi: [
    {
      selector: 'lv-calendar',
      snippet: `<lv-calendar [(ngModel)]="\${1:primary}"></lv-calendar>`,
      name: 'Calendar',
      name_en: 'Calendar',
      api: [
        {
          attribute: 'lvCalendarMode',
          type: `'year' | 'month'`,
          default: 'month',
          description: '显示模式',
          description_en: 'Display mode'
        },
        {
          attribute: 'lvTimezoneOffset',
          type: 'number',
          default: '--',
          description: '本地时间与格林威治标准时间 (GMT) 的分钟差',
          description_en: 'Indicates the minute difference between the local time and the Greenwich Mean Time (GMT).'
        },
        {
          attribute: 'lvCalendarTitleReadonly',
          type: 'boolean',
          default: 'true',
          description: '日历日期显示标题是否只读。',
          description_en: 'The calendar date shows whether the title is read-only.'
        },
        {
          attribute: 'lvCalendarEvents',
          type: 'LvCalendarEvents[]',
          default: '[]',
          description: '日历的事件',
          description_en: 'Calendar events'
        },
        {
          attribute: 'lvOnlyShowActiveCell',
          type: 'boolean',
          default: 'false',
          description: '是否只显示当前状态的单元格，隐藏上一月、年，下一月、年的单元格。',
          description_en: 'Whether to only display the current active date cell, hide cell of the previous month, year, next month, year.'
        },
        {
          attribute: 'lvCalendarHeaderLeft',
          type: 'TemplateRef',
          default: '--',
          description: '自定义日历头部左侧内容。',
          description_en: 'Customize the content on the left side of the calendar header.'
        },
        {
          attribute: 'lvCalendarHeaderRight',
          type: 'TemplateRef',
          default: '--',
          description: '自定义日历头部右侧内容。',
          description_en: 'Customize the content on the right side of the calendar header.'
        },
        {
          attribute: 'lvCalendarCell',
          type: 'TemplateRef',
          default: '--',
          description: '自定义日历日期单元格。',
          description_en: 'Customize the calendar date cell.'
        },
        {
          attribute: 'lvCalendarEventCell',
          type: 'TemplateRef',
          default: '--',
          description: '自定义日历事件内容显示。',
          description_en: 'Customize the display of calendar event content.'
        },
        {
          attribute: 'lvResize',
          type: 'boolean',
          default: 'false',
          description: '是否支持日历拖动改变行高（目前只支持月模式）',
          description_en: 'Whether to support drag the header to change row height'
        }
      ],
      event: [
        {
          event: 'lvActiveDateChange',
          parameter: `Date`,
          description: '激活日期面板改变时的回调函数。',
          description_en: 'Callback when panel is next / prev.'
        },
        {
          event: 'lvCalendarModeChange',
          parameter: `mode`,
          description: '日历模式变化时的回调函数。',
          description_en: 'Callback when the calendar mode changes.'
        }
      ]
    }
  ]
};
